package com.ruoyi.manage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.DonationTypeMapper;
import com.ruoyi.manage.domain.DonationType;
import com.ruoyi.manage.service.IDonationTypeService;

/**
 * 捐赠物种类Service业务层处理
 * 
 * @author zzg
 * @date 2025-03-21
 */
@Service
public class DonationTypeServiceImpl implements IDonationTypeService 
{
    @Autowired
    private DonationTypeMapper donationTypeMapper;

    /**
     * 查询捐赠物种类
     * 
     * @param id 捐赠物种类主键
     * @return 捐赠物种类
     */
    @Override
    public DonationType selectDonationTypeById(Long id)
    {
        return donationTypeMapper.selectDonationTypeById(id);
    }

    /**
     * 查询捐赠物种类列表
     * 
     * @param donationType 捐赠物种类
     * @return 捐赠物种类
     */
    @Override
    public List<DonationType> selectDonationTypeList(DonationType donationType)
    {
        return donationTypeMapper.selectDonationTypeList(donationType);
    }

    /**
     * 新增捐赠物种类
     * 
     * @param donationType 捐赠物种类
     * @return 结果
     */
    @Override
    public int insertDonationType(DonationType donationType)
    {
        return donationTypeMapper.insertDonationType(donationType);
    }

    /**
     * 修改捐赠物种类
     * 
     * @param donationType 捐赠物种类
     * @return 结果
     */
    @Override
    public int updateDonationType(DonationType donationType)
    {
        return donationTypeMapper.updateDonationType(donationType);
    }

    /**
     * 批量删除捐赠物种类
     * 
     * @param ids 需要删除的捐赠物种类主键
     * @return 结果
     */
    @Override
    public int deleteDonationTypeByIds(Long[] ids)
    {
        return donationTypeMapper.deleteDonationTypeByIds(ids);
    }

    /**
     * 删除捐赠物种类信息
     * 
     * @param id 捐赠物种类主键
     * @return 结果
     */
    @Override
    public int deleteDonationTypeById(Long id)
    {
        return donationTypeMapper.deleteDonationTypeById(id);
    }
}
